1. Field of the Invention
This invention relates to adding support for pluggable data formats into an apparatus, system, and method for processing hierarchical data in disparate data repositories.
2. Description of the Related Art
Formats and methods for data representation and exchange are numerous. The volume of different sorts of data, represented in different ways, presents significant challenges to a programmer trying to facilitate communication across types. With various data repositories such as databases, web servers, XML data stores, enterprise information systems, and numerous data formats such as XML, SDO, JavaBeans, etc., coordinating communication can be a formidable task.
A typical situation in which such problems occur is where a client wishes to modify data in an Enterprise Information System (EIS) or other data storage mechanism. The client, however, may not know the EIS Application Programming Interface (API), nor the physical structure of the data.
In order to simplify this process, an intermediary agent such as an adaptor or mediator may be used to bridge the gap between the client and the data repository. This agent facilitates the communication between the two entities.
The Command Manager Disclosure, referenced above, discloses a solution to this problem. The Command Manager Disclosure discloses a common data model that is hierarchical. In addition, the Command Manager Disclosure provides support for both ‘snapshots’ (which represents how the data should look in the EIS) and ‘deltas’ (which represent the changes that are to be made to the data in the EIS). The Disclosure improves on the prior art by providing common code that is much simpler and more readable than the previous approach which required a large piece of EIS-specific code that could not be re-used.
The Command Manager Disclosure taught a Command Manager used to create commands based on the hierarchical structure. The Command Manager generates appropriate commands using the data hierarchy and a specified action. The disclosure teaches an embodiment where the data mediator, of which the Command Manager is part, receives an incoming data structure and retrieves an existing data structure in the data repository for comparison. The incoming data structure is then compared to the existing data structure. This comprises placing an update command in the command structure for the top level command, extracting a set of child keys for the incoming and existing data structures, identifying each child by key, and determining which children need to be deleted, created, and updated. After the comparison, the command structure is populated with the appropriate commands and the command structure is processed by an interpreter.
There are, however, certain performance costs to the above implementation. For example, in order to perform the comparison, in one embodiment the retrieve operation comprises making a shallow copy of the input structure using Service Data Object (SDO) APIs and then retrieving the data into that structure. However, SDO objects are substantial, and the creation of SDO objects for purpose of comparison imposes a significant burden on the system. In addition, the implementation taught in the Command Manager Disclosure does not support the Data Exchange Systems Programming Interface (DESPI).
The DESPI is a data interface which uses cursors to iterate over repeating data objects within a runtime's data set, and uses accessors to access the individual elements within an object. The cursors and accessors point to the native data of the runtime; thus, if the runtime uses XML, cursors and accessors reference elements and attributes respectively. As a result, a connector component (which encapsulates the basic connectivity to a data repository) does not need to be aware of the underlying data structure being referenced since the cursor and accessors hide these additional details. By using the DESPI, a wide variety of data formats can be supported without requiring a transformation of an incoming data structure of arbitrary format into a canonical data format.